# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-tcxreader
_pkgorig=tcxreader
pkgver=0.4.10
pkgrel=1
pkgdesc="tcxparser is a reader / parser for Garmin’s TCX file format"
url="https://github.com/alenrajsp/tcxreader"
arch="noarch"
license="MIT"
depends="python3"
checkdepends="py3-pytest-xdist"
makedepends="py3-gpep517 py3-poetry-core"
subpackages="$pkgname-pyc"
source="https://github.com/alenrajsp/tcxreader/archive/v$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
4ea2828497b1ed477cd4f7d261d8d2df6ac1ebe8238cf07b49645102ac97ad00224d5c6f2fb060d6b5e35aeca9cff019dc88939977be58eeaf344903f50990ea  tcxreader-0.4.10.tar.gz
"
